﻿using System;
using System.Collections.Generic;
using System.Linq;
using T.ServiceComponent.I18N.Service;

namespace T.FAS.Runtime.Base.Common
{
    public class FASTermService
    {
        private static readonly object syncObj = new object();
        private static FASTermService helper;
        public static FASTermService GetInstance()
        {
            if (helper == null)
            {
                lock (syncObj)
                {
                    if (helper == null)
                        helper = new FASTermService();
                }
            }
            return helper;
        }
        private FASTermService()
        {

        }
        /// <summary>
        /// 获取词条
        /// </summary>
        /// <param name="termCode"></param>
        /// <param name="orginalText"></param>
        /// <returns></returns>
        public string GetTranslated(string termCode, string orginalText = null)
        {
            return TermService.Current.GetText(termCode, orginalText);
        }
    }
}
